﻿local AudioManager = { }

local AudioConfig = require "Config.AudioConfig"

function AudioManager.initialize()
end

function AudioManager.PlaySound(name, option)
    local audiodata = AudioConfig[name]
    if (audiodata ~= nil) then
        CS.Kylin.AudioManager.Instance:PlayAudio(name, audiodata.audioType, audiodata.volume, audiodata.channel, option)
    else
        print("error try to play a no exist audio ,name is " .. name)
    end
end

function AudioManager.PlayAudio(name, audiotype, volume, channel, option)
    CS.Kylin.AudioManager.Instance:PlayAudio(name, audiotype, volume, channel, option)
end

function AudioManager.SetGlobalAudioVolume(volume)
    CS.Kylin.AudioManager.Instance:SetGlobalAudioVolume(volume)
end

function AudioManager.SetGolbalMusicVolume(volume)
    CS.Kylin.AudioManager.Instance:SetGolbalMusicVolume(volume)
end

return AudioManager

